package com.example.student.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from admin")
    boolean isExist(String username, String password);

    @Select("select * from admin where username=#{username")
    int findByUsername(String username);

    @Insert("insert into admin (username,pwd) values(#{username},#{pwd})")
    void register(String username, String pwd);
}
